package yu.code.yurpc.server.tcp;

import io.vertx.core.Handler;
import io.vertx.core.buffer.Buffer;
import io.vertx.core.net.NetSocket;
import yu.code.yurpc.model.RpcRequest;
import yu.code.yurpc.model.RpcResponse;
import yu.code.yurpc.protocol.ProtocolMessage;
import yu.code.yurpc.protocol.ProtocolMessageTypeEnum;
import yu.code.yurpc.registry.LocalRegistry;

import java.io.IOException;
import java.lang.reflect.Method;

public class TcpServerHandler implements Handler<NetSocket> {
    @Override
    public void handle(NetSocket netSocket) {
        TcpBufferHandlerWrapper tcpBufferHandlerWrapper = new TcpBufferHandlerWrapper(buffer -> {
            //处理请求代码
        });
        netSocket.handler(tcpBufferHandlerWrapper);
    }
}
